class AddressListEntity {
  AddressListData data;
  int code;
  String msg;

  AddressListEntity({this.data, this.code, this.msg});

  AddressListEntity.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null
        ? new AddressListData.fromJson(json['data'])
        : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class AddressListData {
  List<AddressListDataData> datas;

  AddressListData();

  AddressListData.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      datas = new List<AddressListDataData>();
      (json['list'] as List).forEach((v) {
        datas.add(new AddressListDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['list'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class AddressListDataData {
// id
// 收货地址ID
// user_id
// 用户ID
// province
// 省份
// city
// 城市
// county
// 城市
// detail_address
// 详细地址
// company
// 单位名称
// consignee
// 收件人
// contact_number
// 联系电话
// postcode
// 邮编
// is_default
// 是否为默认地址 Y是 N否

  String id;
  String user_id;
  String province;
  String city;
  String county;
  String detail_address;
  String consignee;
  String contact_number;
  String is_default;
  AddressListDataData(
      {this.id,
      this.user_id,
      this.province,
      this.city,
      this.county,
      this.detail_address,
      this.consignee,
      this.contact_number,
      this.is_default});

  AddressListDataData.fromJson(Map<String, dynamic> json) {
    id = json['id'].toString();
    user_id = json['user_id'].toString();
    province = json['province'];
    city = json['city'];
    county = json['county'];
    detail_address = json['detail_address'];
    consignee = json['consignee'];
    contact_number = json['contact_number'];
    is_default = json['is_default'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['user_id'] = this.user_id;
    data['province'] = this.province;
    data['city'] = this.city;
    data['county'] = this.county;
    data['detail_address'] = this.detail_address;
    data['contact_number'] = this.contact_number;
    data['consignee'] = this.consignee;
    data['is_default'] = this.is_default;

    return data;
  }
}